/*
 * StorageStrategy.h
 *
 *  Created on: 03/10/2009
 *      Author: nik0l4z
 */

#ifndef STORAGESTRATEGY_H_
#define STORAGESTRATEGY_H_
#include <string.h>
#include <stdio.h>
#include "Almacenamiento.h"
#include "../Strategies/Resource/ResourceStrategy.h"

using namespace std;


class StorageStrategy {

	protected: Almacenamiento *almacenamiento;

	protected: ResourceStrategy *resourceStrategy;

	public:StorageStrategy();

	virtual ~StorageStrategy();

	public: virtual void saludar();

	public: virtual int saveData(Dato *data);

	public: virtual int saveData(string data);

	public: virtual void deleteData(int fileRefernce);

	public: virtual void deleteData(list<Clave*> clave);

	public: virtual void deleteData(Clave* clave, int filePos);

	public: virtual int updateData(Dato *data,int filePos);

	public: virtual void updateData(list<Dato*> datos);

	public: virtual string getData(Clave *clave, int fileReference);



	/*-----Getter & Setters-----------------------------------*/
	public: virtual void  setStorage(Almacenamiento *storage);

	public: virtual Almacenamiento *getStorage() const;

	public: virtual void setResourceStrategy (ResourceStrategy* resourceStrategy);
	/*--------------------------------------------------------*/

};

#endif /* STORAGESTRATEGY_H_ */
